<%@ page contentType="text/html;charset=UTF-8"%>
<%@page import="java.util.Date"%>
<%@page import="org.apache.commons.lang.time.DateUtils"%>
<%@page import="java.util.Calendar"%>
<%@page import="com.duowan.common.util.DateConvertUtils"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%
	Calendar cala = Calendar.getInstance();
	cala.add(Calendar.DATE, -1);//昨天
	Date date = cala.getTime();
	String startDate = DateConvertUtils.format(date, "yyyy-MM-dd");
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	request.setAttribute("ctx", path);
	request.setAttribute("startDate", startDate);
%>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<%@include file="/commons/taglibs.jsp"%>
<title>管理后台</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<!-- 默认皮肤 -->
<link id="bs-css" href="${ctx}/css/skin/bootstrap-cerulean.css"
	rel="stylesheet">
<link href="${ctx}/css/bootstrap-responsive.min.css" rel="stylesheet">
<link href="${ctx}/css/dynamic-page.css" rel="stylesheet">
<link href="${ctx}/css/zTreeStyle.css" rel="stylesheet">
<link rel="shortcut icon" href="${ctx}/img/favicon.ico">
<style type="text/css">
body {
	padding-bottom: 40px;
}

.sidebar-nav {
	padding: 9px 0;
}

.menu-li {
	height: 25px;
	margin: 10px 0 0 0;
	list-style-type: none;
}

.menu-li a {
	text-decoration: none;
}

.title {
	font-size: 15px;
	font-weight: bold;
	color: #2FABE9;
}

.select-font {
	color: #2FABE9;
}
</style>

<script type="text/javascript">
	
</script>

</head>
<body>
	<input type="hidden" id="ctx" value="${ctx}"> <!-- topbar starts -->
	<%@ include file="../commons/nav_header.jsp"%>

	<!-- topbar ends -->
	<div class="container-fluid">
		<div class="row-fluid">

			<!-- left menu starts -->
			<div class="span2 main-menu-span">
				<div class="well nav-collapse sidebar-nav">
					<ul class="nav nav-tabs nav-stacked main-menu">
						<li class="nav-header hidden-tablet">后台管理</li>
						<li><a href="${ctx}/sqlJob.do" target="mainFrame"
							onclick="jQuery(this).next().toggle()"><i class="icon-plus"></i><span>
									配置录入</span></a></li>
					</ul>
				</div>
				<!--/.well -->
			</div>
			<!--/span-->
			<!-- left menu ends -->


			<div id="content" class="span10">
				<script type="text/javascript">
					function onLoadIframe(iframe) {
						iframe.height = iframe.contentWindow.document.documentElement.scrollHeight;
					}
				</script>
				<iframe width="100%" id="mainFrame"
					src="${ctx}/sqlJob.do"
					scrolling="auto" name="mainFrame" frameborder="0" height="50"
					padding="0" margin="0" onload="onLoadIframe(this)"
					onreadystatechange="onLoadIframe(this)"> </iframe>
			</div>
		</div>

		<!-- set style -->
		<hr>

		<footer>
			<p class="pull-left">
				&copy; <a href="javascript:void(0)">欢聚时代</a> 2013
			</p>
			<p class="pull-right">
				Powered by: <a href="javascript:void(0)"> 珠海数据中心</a>
			</p>
		</footer>

	</div>
	<!--/.fluid-container-->

	<!-- external javascript
	================================================== -->
	<!-- Placed at the end of the document so the pages load faster -->

	<script src="${ctx}/js/jquery.min.js" type="text/javascript"></script>
	<!-- 在dynamic-page.js中, 用到了jquery-ui的sortable拖曳特效 -->
	<script src="${ctx}/js/jquery-ui.custom.min.js"></script>
	<script src="${ctx}/js/bootstrap.min.js"></script>
	<script src="${ctx}/js/dynamic-page.js"></script>
	<script src="${ctx}/js/ReportTools.js"></script>

	<script src="/js/highcharts/highcharts.js"></script>
	<script src="/js/highcharts/modules/exporting.js"></script>


	<script src="/js/highcharts/highchartsUtil.js"></script>

	<script>
      !function ($) {
        $(function(){
          // carousel demo
          $('#myCarousel').carousel()
        })
      }(window.jQuery)
    </script>

	<script type="text/javascript">
		// var jsonStr = {"hegith":400,"chartType":"line","xTitle":null,"yTitle":null,"refDataList":"blogList","dataList":[{"TDATE":1376409600000,"PRODUCT":"yygame","PAY_SUM":30},{"TDATE":1376496000000,"PRODUCT":"yygame","PAY_SUM":70},{"TDATE":1376496000000,"PRODUCT":"client","PAY_SUM":60}],"sers":[{"title":"1111","y":"PAY_SUM"}],"id":"lineChart","title":"","width":600,"x":"TDATE"};

		$(function() {
			//audit log
			var userName='<%=session.getAttribute("passport")%>';
			ReportTools.reportAuditLog(userName, '加载首页', '首页');

			//sutitable the iframe 
			$("#mainFrame").load(function() {
				ReportTools.suitableIframe();
			});
		});

		var setting = {
			data : {
				simpleData : {
					enable : true
				}
			},
			async : {
				enable : true,
				url : "${ctx}/asyncData.do",
				autoParam : [ "id" ],
			//		dataFilter: filter
			}
		};

		function clearInput() {
			document.getElementById("searchName").value = ""; // 置空
			document.getElementById("searchName").focus();
		}
	</script>
</body>
</html>